package com.gitee.swsk33.consumerdemo.api;

import com.gitee.swsk33.consumerdemo.feignclient.NameClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/consumer/test")
public class TestAPI {

	@Autowired
	private NameClient nameClient;

	@GetMapping("/get")
	public String testLoadBalance() {
		// 远程调用服务提供者
		return nameClient.getName();
	}

}